home *** CD-ROM | disk | FTP | other *** search
- Subject: FW_PResource::GetResourceHandle()
- Sent: 7/19/96 8:07 AM
- Received: 7/19/96 3:22 PM
- From: Keith Mortensen, morty@scruznet.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- I am using the following code to load a custom resource from my running part.
- The returned data is not correct.
-
- Am I using GetResourceHandle() incorrectly?
- Will AcquireData() method be sufficient? or is that only for ODF-supported resource types?
-
-
- typedef struct
- {
- unsigned short count;
- Rect r[1];
- } nrctResource;
- typedef nrctResource **nrctHandle;
-
- void CMainFrame::GetRect(Environment* ev, ODSShort whichRect)
- {
- Rect finalRect;
- FW_CSharedLibraryResourceFile resFile(ev);
- FW_PResource myResource(ev,resFile,1000,'nrct');
- nrctHandle tempH = (nrctHandle)myResource->GetResourceHandle(ev);
- finalRect = (*tempH)->r[whichRect];
- // use the rect data from 'finalRect'... <--•• finalRect does not have the right data!
- myResource->ReleaseData(ev);
- }
-